<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/order/orderInfo/orderInfo.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
</head>


<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>订单管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>订单列表</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var OrderManager_order_update = false;
    var OrderManager_order_look = false;

</script>

<body class="gray-bg orderInfoBody">
<div class="wrapper wrapper-content " style="overflow-x: scroll">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <button class="btn btn-success input-distance" onclick="orderInfo.deletesBtn()">批量删除</button>
                    <button class="btn btn-success input-distance exportBtn" onclick="orderInfo.exportList()">导出</button>
                </div>
                <div class="row">
                    <input id="orderNum" name="orderNum" type="text" class="form-control input-distance longInput"
                           placeholder="订单编号">
                    <input id="startTime" name="startTime" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="开始时间">
                    <input id="endTime" name="endTime" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="结束时间">
                    <select class="form-control shortInput input-distance" name="operatorId" id="operatorId"
                             <c:if test="${role.roleType eq '3'}">hidden="hidden"</c:if> >
                        <option value="">加盟商</option>
                        <c:forEach items="${operatorInfos}" var="operatorInfo">
                            <option value="${operatorInfo.operatorId}">${operatorInfo.operatorName}</option>
                        </c:forEach>
                    </select>
                    <%--&lt;%&ndash; 0:未充电,1:充电中,2:已结束充电 3:充电结算中 &ndash;%&gt;
                    <select id="status" name="status" class="form-control shortInput">
                        <option value="">充电状态</option>
                        <option value="1">充电中</option>
                        <option value="2">已结束充电</option>
                        <option value="3">充电结算中</option>
                    </select>
                    <input id="nickname" name="nickname" type="text" class="form-control shortInput input-distance"
                           placeholder="会员名">



                    <input id="carNum" name="carNum" type="text" autocomplete="off"
                           class="form-control input-distance shortInput"
                           placeholder="车牌号">--%>

                   <%-- <shiro:hasPermission name="OrderManager_order_export">
                        <div class="pull-left search fr exportNumInput">
                            <input id="count" name="count" type="text" class="form-control" autocomplete="off"
                                   placeholder="导出条数">
                        </div>
                        <div class="pull-left search fr">
                            <button class="btn btn-success exportBtn" onclick="orderInfo.exportOrderInfo()">导出</button>
                        </div>
                    </shiro:hasPermission>--%>
                </div>
                <div class="row">
                    <input id="epName" name="epName" type="text" autocomplete="off"
                           class="form-control input-distance shortInput"
                           placeholder="站点">
                    <input id="mobile" name="mobile" type="text" class="form-control shortInput input-distance"
                           placeholder="手机号">
                    <button class="btn btn-success input-distance" onclick="orderInfo.reLoad()">查询</button>
                </div>
                <input id="userTenantCode" name="userTenantCode" type="hidden" value="${user.tenantCode}"><%-- 当前登录用户的tenantCode --%>
            </div>
            <div class="table-responsive" style="z-index: 1;">
                <table id="exampleTable" style="word-break:break-all;" data-mobile-responsive="true">
                    <%--<tbody>--%>
                    <%--<img src="${ctx}/statics/img/newEdition/pageLoading.gif" alt="">--%>
                    <%--</tbody>--%>

                </table>
            </div>


           <%-- &lt;%&ndash;  小票打印的模态框  &ndash;%&gt;
            <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
                 aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true"></span></button>
                            <h4 class="modal-title" id="exampleModalLabel" data-dismiss="modal" aria-label="Close">
                                关闭</h4>
                        </div>
                        <div class="modal-body">
                            <form id="contentForm" class="layui-form">
                                <div class="form-group row"
                                     style="margin-bottom: 0px !important;margin-top: 20px !important;">
                                    <label class="col-sm-4 col-form-label text-right">车牌号*:</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" id="saveCarNum" name="saveCarNum">
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-success" id="resetPrintReceipt">重置打印</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-success" id="savePrintReceipt">确认打印</button>
                        </div>
                    </div>
                </div>
            </div>

            &lt;%&ndash;  异常订单数据修复登记弹框  &ndash;%&gt;
            <div class="modal fade" id="exampleModal1" tabindex="-1" role="dialog"
                 aria-labelledby="exampleModalLabel1">
                <div class="modal-dialog modal-dialog-centered" role="document">
                    <div class="modal-content" style="height: 730px;">
                        <div class="modal-header" style="margin-bottom: 30px">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true" style="margin-right: 170px;height: 30px;line-height: 30px;font-size: 15px">异常订单数据修复登记</span></button>
&lt;%&ndash;                            <h4 class="modal-title" id="exampleModalLabel1" data-dismiss="modal" aria-label="Close">&ndash;%&gt;
&lt;%&ndash;                                关闭</h4>&ndash;%&gt;
                        </div>
                        <div class="modal-body" style="text-align: center">
                            <form id="contentForm1" class="layui-form">
                                <input type="hidden" id="elecStationId" name="elecStationId">
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">开始时间:</label>
                                    <input id="startTime1" name="startTime" type="text" style="width: 268px;margin-left: 15px;"
                                           class="form-control input-distance timeInput" autocomplete="false"
                                           placeholder="开始时间">
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">结束时间:</label>
                                    <input id="endTime1" name="endTime" type="text" style="width: 268px;margin-left: 15px;"
                                           class="form-control input-distance timeInput" autocomplete="false"
                                           placeholder="结束时间">
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">电量:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="totalPower" name="totalPower" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">电费:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="elecMoney" name="elecMoney" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">服务费:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="serviceMoney" name="serviceMoney" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">优惠:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="discountAmount" name="discountAmount" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">总价:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="totalMoney1" name="totalMoney" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">实付:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="payAmount" name="payAmount" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">实付差值:</label>
                                    <div class="col-sm-8">
                                        <input type="number" style="text-align: center" class="form-control" id="diffPayAmount" name="diffPayAmount" step="0.01" value="0">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">开始soc:</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" id="beginSoc" name="beginSoc">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">结束soc:</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" id="soc" name="soc">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label text-right">解决办法:</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" id="solution" name="solution"></textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer" style="margin-top: -10px">
                            <button type="button" class="btn btn-default" data-dismiss="modal" id="cancel">取消</button>
                            <button type="button" class="btn btn-success" id="submitData">确认数据</button>
                        </div>
                    </div>
                </div>
            </div>--%>

            <%--</div>--%>
        </div>
    </div>
</div>
<%--<script src="http://cn.inspinia.cn/html/inspiniacn/hplus/js/plugins/layer/laydate/laydate.js"></script>--%>
<shiro:hasPermission name="OrderManager_order_update">
    <script>
        OrderManager_order_update = true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="OrderManager_order_look">
    <script>
        OrderManager_order_look = true;
    </script>
</shiro:hasPermission>
<script type="text/javascript">

   /* var thisDate = new Date();
    var year = thisDate.getFullYear();
    var month = thisDate.getMonth() + 1;
    var date = thisDate.getDate();
    if (month < 10) {
        month = '0' + month
    }
    if (date < 10) {
        date = '0' + date
    }
    $('#startTime').val(year + '-' + month + '-' + date + ' ' + '00:00:00');*/
</script>
</body>
</html>
<script>
    // //日期范围限制
    var start = {
        elem: '#startTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            $("#endTime").val("")
            end.min = datas
        }
    };
    var end = {
        elem: '#endTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    laydate.skin('molv');//皮肤

    /*// //异常订单登记日期范围限制
    var start1 = {
        elem: '#startTime1',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            $("#endTime1").val("")
            end.min = datas
        }
    };
    var end1 = {
        elem: '#endTime1',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start1);
    laydate(end1);
    laydate.skin('molv');//皮肤*/

    orderInfo.init();
</script>
<script>
    /*function listHlhtOperator(hlhtOrderType, hlhtType) {
        $.ajax({
            "url": prefix + "/listHlhtOperator",
            "type": "GET",
            "data": {
                'hlhtType': hlhtType,
                'hlhtOrderType': hlhtOrderType
            },
            "success": function (data) {
                //console.log(data);
                $("#hlhtOperatorId").html("")

                var hlhtType = $("#hlhtType").val();

                var str = '<option value="" >互联运营商</option>'
                if (data.data) {

                    if (hlhtType == "0") {
                        for (var i = 0; i < data.data.length; i++) {
                            str += "<option value=" + data.data[i].tenantCode + " >" + data.data[i].tenantName + "</option>";

                        }
                    } else {
                        for (var i = 0; i < data.data.length; i++) {
                            str += "<option value=" + data.data[i].hlhtOperatorId + " >" + data.data[i].hlhtOperatorName + "</option>";

                        }
                    }
                }

                $("#hlhtOperatorId").append(str);
                $("#hlhtOperatorId + div").remove()
                $('#hlhtOperatorId').searchableSelect();
                //console.log(str)

            },
            "complete": function () {
            }
        })
    }

    listHlhtOperator("");

    $("#hlhtType").change(function () {
        var hlhtOrderType = $("#hlhtOrderType").val();
        var hlhtType = $("#hlhtType").val();
        listHlhtOperator(hlhtOrderType, hlhtType)
    })

    $("#hlhtOrderType").change(function () {
        var hlhtOrderType = $("#hlhtOrderType").val();
        var hlhtType = $("#hlhtType").val();
        listHlhtOperator(hlhtOrderType, hlhtType)
    })*/
</script>
<script type="text/javascript">
    /*$(function () {
        $('#hlhtOrderType').searchableSelect();
    })
    $(function () {
        $('#hlhtType').searchableSelect();
    })*/
</script>

